Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle push_null in the unknown geometry builder #894

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

kylebarron
Copy link
Member

@kylebarron kylebarron commented Dec 4, 2024

Adding nulls is tricky. We often want to use this builder as a generic builder for data
from unknown sources, which then gets downcasted to an array of a specific type.

In a large majority of the time, this builder will have only data of a single type, which
can then get downcasted to a simple array of a single geometry type and dimension. But in
order for this process to be easy, we want the nulls to be assigned to the same array type
as the actual data.

When there's a valid geometry pushed before the null, we can add the null to an existing
non-null array type, but if there are no valid geometries yet, we don't know which array to
push the null to. This deferred_nulls is the number of initial null values that haven't
yet been written to an array, because we don't know which array to write them to.

@kylebarron kylebarron changed the title handle push_null in the unknown geometry builder handle push_null in the unknown geometry builder Dec 4, 2024
@kylebarron kylebarron enabled auto-merge (squash) December 4, 2024 19:32
@kylebarron kylebarron merged commit 2f17d2c into main Dec 4, 2024
20 of 22 checks passed
@kylebarron kylebarron deleted the kyle/unknown-builder-push-null branch December 4, 2024 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant